package org.jeecg.modules.lab.exam.paper.service;


import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.modules.lab.exam.entity.LabExam;
import org.jeecg.modules.lab.exam.entity.LabExamPaper;
import org.jeecg.modules.lab.exam.entity.LabExamPaperQuestion;
import org.jeecg.modules.lab.exam.entity.LabExamPaperQuestionAnswer;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;

/**
 * @Description: 考试记录
 * @Author: jeecg-boot
 * @Date:   2023-08-30
 * @Version: V1.0
 */
public interface ILabExamPaperService extends IService<LabExamPaper> {

	/**
	 * 添加一对多
	 *
	 * @param labExamPaper
	 * @param labExamPaperQuestionList
	 * @param labExamPaperQuestionAnswerList
	 */
	public void saveMain(LabExamPaper labExamPaper, List<LabExamPaperQuestion> labExamPaperQuestionList, List<LabExamPaperQuestionAnswer> labExamPaperQuestionAnswerList) ;
	
	/**
	 * 修改一对多
	 *
   * @param labExamPaper
   * @param labExamPaperQuestionList
   * @param labExamPaperQuestionAnswerList
	 */
	public void updateMain(LabExamPaper labExamPaper,List<LabExamPaperQuestion> labExamPaperQuestionList,List<LabExamPaperQuestionAnswer> labExamPaperQuestionAnswerList);
	
	/**
	 * 删除一对多
	 *
	 * @param id
	 */
	public void delMain (String id);
	
	/**
	 * 批量删除一对多
	 *
	 * @param idList
	 */
	public void delBatchMain (Collection<? extends Serializable> idList);

	/**
	 * 创建试题
	 *  @param sysUser
	 * @param labExam
     * @return
     */
	public String creatPaper(LoginUser sysUser, LabExam labExam);

	/**
	 * 提交试题
	 */
	public double submitPaper(String paperId);

}
